package com.frejoys.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frejoys.dao.entity.PlatformWallet;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface PlatformWalletMapper extends BaseMapper<PlatformWallet> {

    //获取该组的钱包id
    @Select("select id from j_platform_wallet where agent_role_group_id = #{groupId}")
    Integer getId(@Param("groupId") Integer groupId);

    //获取该组钱包数据
    @Select("select id,agent_role_group_id,money from j_platform_wallet where agent_role_group_id = #{groupId} limit 1")
    PlatformWallet getOne(@Param("groupId") Integer groupId);
}
